package com.classtest;

public class InnerClassDemo1 {
    public static void main(String[] args) {
        OuterClass outerClass = new OuterClass();
        //创建内部类对象
        //创建内部类对象
        OuterClass.InnerClass innerClass = new OuterClass().new InnerClass();


    }
}

class OuterClass {
    private int a = 10;
    public void show() {
        System.out.println("show()方法");
    }
    class InnerClass {
        private int b = 20;
        public void show() {
            System.out.println("InnerClass show()方法");
            System.out.println("a = " + a);
        }
    }
}
